<?PHP

$gallery_data=new blog;
$gallery_data->content_type=7;
$gallery=$gallery_data->get_content();

//get all image data


//rotate




if($conf->module=='contentid')
{
			
	$images_data=new content;
	$images_data->content_gallery=$conf->key_string;		
	$gallery_images=$images_data->get_content_with_images();

	
}
else
{
	foreach($gallery as $x)
	{
		$images_data=new content;
		$images_data->content_gallery=$x['content_id'];
		$images=$images_data->get_content_with_images();

		$ilan=count($images);
		$a1=rand(1,$ilan)-1;
		$a2=rand(1,$ilan)-1;
		$a3=rand(1,$ilan)-1;

			$thumbs[0][0]=f_path($images[$a1]['content_image'],$conf->thumb_dir);
			$thumbs[0][1]=f_path($images[$a1]['content_thumb'],$conf->thumb_dir);

			$thumbs[1][0]=f_path($images[$a2]['content_image'],$conf->thumb_dir);
			$thumbs[1][1]=f_path($images[$a2]['content_thumb'],$conf->thumb_dir);

			$thumbs[2][0]=f_path($images[$a3]['content_image'],$conf->thumb_dir);
			$thumbs[2][1]=f_path($images[$a3]['content_thumb'],$conf->thumb_dir);



			$gallery_images[$x['content_id']]=$thumbs;
	}	
}


?>